﻿#This creates the definition for the resource
Import-Module xDSCResourceDesigner

$dscResourceName = "MESF_IISAdditionalProperties"
$dscResourceFriendlyName = "cIISAdditionalProperties"

$scriptPath = $PSCommandPath
$scriptfile = Get-Item -Path $scriptPath

$schemaMofFile = $scriptfile.Directory.Parent.FullName

write-host "Start generating $schemaMofFile" -ForegroundColor Green

#The IIS Site Name
$SiteName = New-xDscResourceProperty -Name SiteName -Type String -Attribute Key

#Identify if the action is to create the share or remove the share (i.e. should it be present or absent)
$Ensure    = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet "Present", "Absent"

#Create the actual resource
New-xDscResource -Name $dscResourceName -Property $SiteName, $Ensure -Path $schemaMofFile -FriendlyName $dscResourceFriendlyName

write-host "End generating $schemaMofFile" -ForegroundColor Green
